package com.usermanage.util;

import com.usermanage.beanParam.PermissionBean;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

//import com.jinhetech.yogurt.util.base.Constants;

/**
 * Created by  on 2018/9/20
 */
public class PermissionUtils {
    /**
     * 根据权限列表得到非表格权限按钮
     * @param list  权限列表
     * @param url  路径url
     * @return
     */
    public static boolean isExistPermission(List<PermissionBean> list,String url) {
        boolean bool = false;
        for (PermissionBean bean:list) {
            if (bean.getPermission_url().equals(url)){
                bool = true;
            }
        }
        return bool;
    }


}
